<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <ui:composition template="mainlayout.xhtml">
            <ui:define name="content">
                <h:form>
                    <style>
                        .rightAll{
                            width: 50%;
                            text-align: right;
                        }
                        .leftAll{
                            width: 50%;
                            text-align: left;
                        }
                    </style>

                    <p:panel>
                        <f:facet name="header">
                            <h:panelGroup style="display: block; text-align:center">
                                <h:outputText value="#{usersView.user.name}'s profile"/>
                            </h:panelGroup>
                        </f:facet>

                        <h:panelGrid style="width: 100%" columns="2" columnClasses="rightAll, leftAll" >
                            <p:outputLabel value="Username: "/>
                            <p:outputLabel value="#{usersView.user.username}"/>
                            <p:outputLabel value="Name: "/>
                            <p:outputLabel value="#{usersView.user.name}"/>
                            <p:outputLabel value="Surname: "/>
                            <p:outputLabel value="#{usersView.user.surname}"/>
                            <p:outputLabel value="Birthday: "/>
                            <p:outputLabel value="#{usersView.user.dateOfBirth}">
                                <f:convertDateTime pattern="dd/MM/yyyy" timeZone="GMT+1"/>
                            </p:outputLabel>
                            <p:outputLabel value="Email: "/>
                            <p:outputLabel value="#{usersView.user.email}"/>
                            <p:outputLabel value="Description: "/>
                            <p:outputLabel value="#{usersView.user.description}"/>
                        </h:panelGrid>
                        <p:separator />
                        <h:panelGroup style="display:block; text-align:center">
                            <p:button outcome="/users/otherCalendar" value="View Calendar" disabled="#{!usersView.user.calendar.shared}"/>
                        </h:panelGroup>
                    </p:panel>
                </h:form>
            </ui:define>
        </ui:composition>

    </h:body>
</html>

